using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

public class Log
{
    private static string logFileName;

    public static void Init(string folder)
    {
        logFileName = folder + "Log" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
    }

    public static void WriteLine(string content)
    {
        if (!string.IsNullOrEmpty(logFileName))
        {
            List<string> list = new List<string>();
            list.Add(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + ":" + content);
            List<string> contents = list;
            File.AppendAllLines(logFileName, contents, Encoding.UTF8);
        }
    }

    public static void Debug(string content)
    {
        WriteLine(content);
    }
}
